/**
 * 项目名：五位一体化工安全信息平台
 * 日期：    2019-11-24 23:34:52
 * Copyright (c) 2015- joysuch-版权所有
 */

package com.joysuch.wwyt.bp.service;

import com.joysuch.wwyt.api.base.dto.ApiJobDto;
import com.joysuch.wwyt.bp.bean.BpJobSearchBean;
import com.joysuch.wwyt.bp.entity.BpJob;
import com.joysuch.wwyt.core.bean.SimpleSelectListBean;
import com.joysuch.wwyt.dzhapi.bean.ApiBpJobBean;
import com.joysuch.wwyt.dzhapi.dto.BuildDataDto;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface BpJobService {

    public void add(BpJob entity) throws Exception;

    void update(BpJob entity) throws Exception;

    Page<BpJob> findByPage(Pageable page, BpJobSearchBean bpJobSearchBean);

    void delete(Long id);

    void apiDelete(Long id, BuildDataDto dto);

    BpJob findById(Long id);

    public List<BpJob> findAllJobByTenentId(Long tenentId);

    BpJob editAlarmTemplate(Long jobId, Long templateId, String templateName);

    List<SimpleSelectListBean> getList();

    List<String> deleteByIds(List<Long> ids);

    void deleteCross(Long id, String buildId);

    /**
     * 全部岗位信息列表
     * @param jobName
     * @param tenentId
     * @param orgCode
     * @return
     */
    List<ApiJobDto> getListForApi(String jobName, Long tenentId, String orgCode);

    /**
     * 分页岗位信息
     * @param page
     * @param size
     * @param jobName
     * @param tenentId
     * @param orgCode
     * @return
     */
    com.baomidou.mybatisplus.extension.plugins.pagination.Page<ApiJobDto> getListByPageForApi(Integer page, Integer size, String jobName, Long tenentId, String orgCode);

    List<ApiBpJobBean> findByIds(List<Long> jobIds);
}
